<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<title>Cong ty T&T</title>
<meta http-equiv="Content-Language" content="English" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="author"
	content="David Herreman (www.free-css-templates.com)" />
<meta name="description" content="" />
<meta name="keywords" content="free,css,template" />
<meta name="Robots" content="index,follow" />
<meta name="Generator" content="sNews 1.5" />
<?php
	$this->load->config("config");
	$url = $this->config->item('base_url');
	$stylepath = $url."css/style.css";
	$jspath = $url."js/";
	$currentlang = $this->lang->languageCode();
?>

<link rel="stylesheet" type="text/css" href="<?php echo $stylepath?>"
	media="screen" />
<link rel="stylesheet" type="text/css" href="<?php echo $url."css/enhanced.css"?>"
	media="screen" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0"
	href="rss/" />
<link rel="icon" href="<?php echo $url."images/favicon.png"?>">
<script type="text/javascript" src="<?php echo $jspath."jquery-1.3.2.min.js"?>"></script>
<script type="text/javascript" src="<?php echo $jspath."jQuery.fileinput.js"?>"></script>
</head>
<body class="<?php echo $currentlang?>">
	<div class="body-content">
	<div class="content">
		<div id="top">
			<div class="top-content">
			<div class="logo"></div>
			<h2><?php echo $this->lang->line('lang.menu.slogan')?></h2>
			<div class="language-bar">
				<a href="<?php echo $url.$this->lang->switch_uri('vi');?>" <?php if($currentlang == 'vi'){
						echo "class='current-language'";
					}
					?>
				><img src="<?php echo $url.'images/vn.png'?>"></a>
				<a href="<?php echo $url.$this->lang->switch_uri('en');?>" <?php if($currentlang == 'en'){
						echo "class='current-language'";
					}
					?>
				><img src="<?php echo $url.'images/en.png'?>"></a>
			</div>
			</div>
		</div>
		<div id="menu">
			<table width="100%" cellpadding="0" cellspacing="0">
			<tr>
			<td>
			<ul>
				<?php
					if(empty($home_selected_class)) 
					{
						$home_selected_class = "";
					}
					if(empty($search_selected_class))
					{
						$search_selected_class = "";
					}
					if(empty($import_selected_class))
					{
						$import_selected_class = "";
					}
					if(empty($about_selected_class))
					{
						$about_selected_class = "";
					}
				?>
				<li><a class="<?php echo $home_selected_class?>" href="<?php echo $url.$currentlang?>" ><?php echo $this->lang->line('lang.menu.home')?></a></li>
				<?php
					if($this->session->userdata('loggedIn') == true)
					{
						echo "<li><a class='".$search_selected_class."' href='".$url.$currentlang."/search'>".$this->lang->line('lang.menu.search').'</a></li>';
					}
				
					if($this->session->userdata('loggedIn') == true && $this->session->userdata('role') == ROLE_ADMIN){
						echo "<li><a class='".$import_selected_class."' href=".$url.$currentlang.'/import'.'>'.$this->lang->line('lang.menu.import').'</a></li>';
					} 
				?>
				<li><a  class="<?php echo $about_selected_class?>" href="<?php echo $url.$currentlang.'/about'?>" ><?php echo $this->lang->line('lang.menu.contact')?></a></li>
			</ul>
			</td>
			<td>
			<div style="float:right;">
				<?php 
					$loggedIn = $this->session->userdata('loggedIn');
					echo "<div class='login-info'>";
					if(empty($loggedIn)){
						$this->load->helper("form");
						echo form_open($url.$currentlang.'/login/do_login/');
						echo "<span>";
						echo "<label>".$this->lang->line('lang.menu.username')."</label>";
						echo "</span>";
						echo "<span>";
						echo "<input type='text' size='7' name='username'/>";
						echo "</span>";
						echo "<span>&nbsp;&nbsp;";
						echo "<label>".$this->lang->line('lang.menu.password')."</label>";
						echo "</span>";
						echo "<span>";
						echo "<input type='password' size='7' name='password'/></span>";
						echo "<span><input type='submit' value='".$this->lang->line('lang.menu.loginbtn')."'/></span>";
						echo "</form>";
					} else {
						$username = $this->session->userdata('user')->NAME;
						echo "<label class='user-logged'><a title='".$this->lang->line('lang.edit.user.tooltip')."' href='".$url.$currentlang.'/user'."'>".$username.'</a>&nbsp;|&nbsp;</label>'."<a href='".$url.$currentlang.'/login/logout'."'>".$this->lang->line('lang.menu.logout')."</a>";
					}
					echo "</div>";
				?>
			</div>
			</td>
			</tr>
			</table>
			
		</div>

		<div id="main">
			<div id="right_side">
				<div class="pad">
					<div class="introduce-image-canxe"></div>
					<h3><?php echo $this->lang->line('lang.right.field1')?></h3><br/><br/>
					<div class="introduce-image-transport"></div>
					<h3><?php echo $this->lang->line('lang.right.field2')?></h3><br/><br/>
					<div class="introduce-image-shipping"></div>
					<h3><?php echo $this->lang->line('lang.right.field3')?></h3>
				</div>
			</div>
			<div id="left_side">
				<div class="mpart">
					<?php echo $content?>
				</div>
				<div id="footer">
					<div class="right">
						<?php echo $this->lang->line('lang.footer');?>
					</div>
				</div>
			</div>

		</div>
		
	</div>
</div>
</body>
</html>
